package com.kedacom.demo.quartz;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("simpleMethodInvokingJob")
@Transactional
public class SimpleMethodInvokingJob implements Job {

	/** serialVersionUID */
	private static final long serialVersionUID = -8170769771045886300L;

	protected Logger logger = LoggerFactory.getLogger(getClass());

	@Override
	public void execute() {
		try {
			logger.debug("simple method invoke task start...");
			Thread.sleep(Constants.taskExcuteTime);
			logger.debug("simple method invoke task end.");
		} catch (InterruptedException e) {
			e.printStackTrace();
			logger.error("simple method invoke task occur exception.");
		}
	}

}
